<?php
/**
 * Created by PhpStorm.
 * User: longli
 * VX: isa1589518286
 * Date: 2021/08/23
 * Time: 23:53
 * @link http://www.lmterp.cn
 */

namespace app\common\model;

/**
 * 渠道可走物流属性
 * Class ChannelAllowAttr
 * @package app\common\model
 */
class ChannelAllowAttr extends BaseModel
{
    protected $pk = 'allow_id';

    protected $autoWriteTimestamp = 'datetime';

    protected $insert = ['create_by', 'update_by'];

    protected $update = ['update_by'];

    /**
     * 关联渠道
     * @return \think\model\relation\BelongsTo
     * @date 2021/08/24
     * @author longli
     */
    public function channel()
    {
        return $this->belongsTo(Channel::class, 'channel_id', 'channel_id');
    }
}
